<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>帖子详情</title>
<%@ include file="../common/link.jsp" %>
<%@ include file="../common/script.jsp" %>
<script type="text/javascript">
$(window).load(function(){
	$('#demo-side-bar').removeAttr('style');
});
</script>
<style type="text/css">
.demobar{display:none;}
#demo-side-bar{top:53px!important;left:90%!important;display:block!important;}
</style>
<%@ include file="../common/header.jsp" %>
</head>
<body>
<!-- START CONTENT -->
	<section class="container clearfix">
		<!-- Page Title -->
			<header class="container page_info clearfix">
				
					<h1 class="regular brown bottom_line">帖子详情</h1>
				
				<div class="clear"></div>
			</header>
			
		<!-- /Page Title -->
		
		<!-- START CONTENT SIDE -->
		<div class="content clearfix">
			<article class="blog_post no_margin clearfix">
			   <c:if test="${!empty postDetail }">
				<span class="post_title">${postDetail.postTitle}</span>
				<div class="clear"></div>
				
				<div class="date">${postDetail.postCode}</div>
                <div class="author"><a href="#">${postDetail.user.userName}</a></div>
				<div class="number_comments"><a href="#">${post.replyCnt } 评论</a></div>
				
				<div class="clear"></div>
				<p>
				${postDetail.postMain}</p>
			    </c:if>
				<div class="line"></div>
				<div class="clear padding20"></div>
				<div class="clear padding5"></div>
				<div class="line"></div>
				
				<div class="clear padding50"></div>

				<!-- START COMMENTS -->
				<div class="comments_nr">
					<h3>评论列表</h3>
				</div>
				
				<div class="add_comments">
					<a href="#leave_comment">评论</a>
				</div>
				<div class="clear"></div>
				<div class="line"></div>
				
				<div class="clear"></div>
				
				<!-- START COMMENT BOX-->
				<div class="comment_box">
					<div class="avatar">

					</div>
					<c:forEach items="${replys}" var="reply">
                    <div class="comments-info"><a href="#" class="writer">${reply.user.userName}</a> <span class="when">|</span>  <span class="when">February 6th, 2012 at 7:13 pm</span></div> <a href="#" class="reply">Reply</a>
					<div class="text">
						<p>
							${reply.rpMain}					
						</p>
					</div>
					<div class="clear"></div>
                    </c:forEach>
				</div>
				
				<!-- END COMMENT BOX-->

				
				
				<div class="clear padding40"></div>
				<!-- END COMMENTS -->
				
				<!-- START LEAVE A COMMENT -->
				<h3 class="bottom_line2" id="leave_comment">发布评论</h3>
				<div class="clear"></div>
				
				<form method="post" action="${pageContext.request.contextPath}/post/replypost" class="comments_form">
					<div class="textarea_wrap">
						<label for="message">您的评论<span>*</span></label>
						<textarea name="rpMain" id="rpMain" cols="70" rows="6"></textarea>
						<input type="hidden" name="postId" value="${postDetail.postId}"/>
					</div>
					<div class="clear padding25"></div>
					<button type="submit" class="btn btn-primary">发送评论</button>
					<div class="clear"></div>
				</form>
				<div class="clear"></div>
				<!-- END LEAVE A COMMENT -->
			</article>
		</div>
		<!-- END CONTENT SIDE -->
		
		<!-- START SIDEBAR SIDE -->
		<div class="sidebar">
			<!-- START RECENT BLOG POST -->		
			
			<div class="widget">
				<h2><span>最新帖子</span></h2><br/>
				<c:forEach items="${newPosts}" var="post">	
				<div class="recent_post">
					<div class="text">
						<a href="${pageContext.request.contextPath}/post/postdetail?postId=${post.postId}" class="title">${post.postTitle }</a>
						<div class="clear"></div>
						<div class="time">${post.postCode }</div>
						<div class="comments">${post.replyCnt } 评论</div>
						<div class="clear"></div>
					</div>
					<div class="clear"></div>
				</div>
				</c:forEach>
			</div>
			
			<!-- END RECENT BLOG POST -->
		
		</div>
		<!-- END SIDEBAR SIDE -->
		
		<div class="clear padding40"></div>
	</section>
	<!-- END CONTENT -->
<%@ include file="../common/footer.jsp" %> 	
</body>
</html>